import React, { Component } from 'react'
import { Switch,Route } from 'react-router-dom';
import MyNavLink from '../../components/MyNavLink';
import Message from './Message';
import News from './News';
export default class Home extends Component {
  render() {
    return (
      <div>
        <div className='flex'>
          <MyNavLink to="/home/news">News</MyNavLink>
          <MyNavLink to="/home/message">Message</MyNavLink>
        </div>
        <Switch>
          <Route path='/home/news' component={News}/>
          <Route path='/home/message' component={Message}/>
        </Switch>
      </div>
    )
  }
}
